import http from '../util/request.js'
export default {
    add:(obj)=>{
        return http({
            url:'/api/classification',
            method:'post',
            data:obj,
            headers: {
                //定义将数据以json的形式传入后台(java)
                'Content-Type': 'application/json'
            }
        });
    },
    edit:(obj)=>{
        return http({
            url:'/api/classification',
            method:'put',
            data:obj,
            headers: {
                //定义将数据以json的形式传入后台(java)
                'Content-Type': 'application/json'
            }
        });
    },
    //传表单参数
    page:(obj)=>{
        return http({
            url:'/api/classification/page',
            method:'get',
            params:obj
        });
    },
    list:(obj)=>{
        return http({
            url:'/api/classification/list',
            method:'get',
            params:obj
        })
    }
}